/*
 * Lenovo Group
 * Copyright (c) 2015-2016 All Rights Reserved.
 * 
 * Project Name:assign-tracer
 * Create Time: 2016年2月14日 上午10:37:01
 */
package com.lenovo.lmrp.server.assigntracer.domain.ticket;

import java.util.List;
import java.util.Map;

import com.lenovo.lmrp.api.constant.TicketStatus;
import com.lenovo.lmrp.api.model.entity.AssigningTicketPO;
import com.lenovo.lmrp.api.model.entity.TicketPO;
import com.lenovo.lmrp.api.model.entity.TicketSLAPO;
import com.lenovo.lmrp.api.model.view.SearchListFilter;
import com.lenovo.lmrp.api.model.view.TicketTotalVO;

/**
 * @author songyz
 *
 */
public interface ITicketRepository {

	public TicketBO createTicketBO(String itsmCode, String ticketId, boolean withExt);

	public TicketBO createTicketBOwithMQClient(String itsmCode, TicketPO ticketPO, boolean withMQ);

	public TicketBO createTicketBO(String itsmCode, TicketPO ticketPO);

	public void store(String itsmCode, TicketPO TicketPO);

	public void store(String itsmCode, AssigningTicketPO assigningTicketPO);

	/**
	 * 工单列表查询 根据status条件区分 接单列表、抢单列表、活动工单列表和历史工单列表
	 * 
	 * @param itsmcode
	 * @param filter
	 * @return
	 */
	public List<TicketPO> getTicketList(String itsmcode, SearchListFilter filter);

	/**
	 * 查询工单SLA信息
	 * 
	 * @param itsmcode
	 * @param id
	 * @return
	 */
	public TicketSLAPO getTicketCurrentSLA(String itsmcode, String id);

	/**
	 * 查询工程师可见的派单或抢单的工单ID列表
	 * 
	 * @param itsmcode
	 * @param engineer
	 *            工程师登录帐号
	 * @param type
	 *            查询类型 抢单、派单
	 * @return
	 */
	public TicketTotalVO getAssigningTicketsByEngineer(String itsmcode, String engineer);

	/**
	 * 查询工单详情
	 * 
	 * @param itsmcode
	 * @param ticketId
	 * @return
	 */
	public TicketPO getTicket(String itsmcode, String ticketId);

}
